package com.example.springboot_shiro.controller;

import com.example.springboot_shiro.domain.tttt.Reserve;
import com.example.springboot_shiro.service.ReserveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author: lqy
 * @date: 2021/9/10 12:01
 * @description:
 */
@Api
@Controller
@RequestMapping("/tttt")
@AllArgsConstructor
public class TController {
    private final ReserveService reserveService;

    @ApiOperation(value = "测试多数据源")
    @GetMapping("/find")
    @ResponseBody
    public List<Reserve> findAll() {
        return reserveService.findAll();
    }
}
